<select onchange="<?php echo  selectAction('id')?>" style="width: 150px;">
    <option value="0">Select category</option>
    <?php echo ListOptionParentProduct($id)?>
</select>

<?php echo inputSearch('search product')?>
<?php echo buttonResetPage()?>

<form method="post" name="form_admin" action="<?php echo formAction('updatestatus')?>">
<input type="hidden" name="id" value="<?echo $id?>" />
	<table width="100%"  cellpadding="4" cellspacing="1" id="tblsort">
		<tr class="headtb" nodrop="true" nodrag="true">
			<td width="5%" ><?echo _ORDER?></td>
			<td width="5%" ><?echo _CODE?></td>
			<td width="200" >Product Name</td>
			<td width="140" ><?echo _PRICE?></td>
			<td width="10%" >View</td>
			<td width="10%" ><?echo _DEPOSITORY?></td>
			<td width="5%" ><?echo _STATUS?></td>
			<td width="5" ><?echo _ACTIONS?></td>
			<td>&nbsp;</td>
		</tr>
	<?
	foreach($contents as $i => $content)
	{
	?>
	<tr>
		<td align=center>
			<input class="ordertext" id="listorder_<?php echo $i?>" name="listorder[]" value="<?echo getOrderList($i)?>">
		</td>
		<TD>
			<?echo $content['cCode']?>
		</TD>
		<td nowrap="nowrap">
		<input type="text" class="noedit" name="listname[]" style="width:230px;" value="<?php echo $content["cName"]; ?>">
		<input type="hidden" name="listid[]" value="<?echo $content["iId"]?>" />
		</td>
		<TD align="right" nowrap>
			<input type="text" class="noedit" name="listprice[]" style="width:100px;text-align:right" value="<?echo $content['cPrice']?>">
			<?echo getconfig("UnitInput")?>
		</TD>
		<td align="right">
			<?echo $content['iCountView']?>
		</td>
		<td align="right">
			<?echo empty($content['cDepository'])? "Sold Out": $content['cDepository']?>
		</td>
		<td align=center>
			<select name="liststatus[]" id="liststatus_<?php echo $i ?>">
				<?php echo  liststatus($content["iStatus"]);?>
			</select>
		</td>
		<td align=center nowrap>
			<?echo BuildActions($content["iId"],array('edit','delete'))?>
		</td>
		<td></td>
		</tr>
	<?php
	}
	?>	
	</table>
</form>
<?php echo $show_page?>

<script type="text/javascript">
(new TableDnD).init("tblsort");
</script>
